package com.dailyblue.example.springcloud.consumer.feign.controller;

import com.dailyblue.example.springcloud.commons.util.JsonResult;
import com.dailyblue.example.springcloud.consumer.feign.service.ConsumerFeignService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/consumer_feign")
public class ConsumerFeignController {
    @Resource
    private ConsumerFeignService service;

    @GetMapping("/a")
    public JsonResult a() {
        return service.a();
    }
    @GetMapping("/c/{a}")
    public JsonResult c(@PathVariable int a) {
        return service.c(a);
    }
}
